package com.xvaca.spcms.servlet.admin.pipe;

import java.io.IOException;
import java.util.List;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.xvaca.spcms.bean.PipeBean;
import com.xvaca.spcms.dao.PipeDAO;

/**
 * Servlet implementation class PipeListServlet
 */
public class PipeListServlet extends HttpServlet {
	private static final long serialVersionUID = 1L;

	/**
	 * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
	 */
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		
		PipeDAO dao = new PipeDAO();
		List<PipeBean> list = dao.getPipeList();
		
		request.setAttribute("pipes", list);
		request.getRequestDispatcher("pipe_list.jsp").forward(request, response);
	}

}
